﻿<div ng-controller="Approval_ManageC">
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">审批流程管理列表</h1>
    </div>
    <div class="wrapper-md" style="text-align: center;">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="col-lg-3 col-md-3 col-sm-3 col-xs-12" style="float: right">
                </div>
                <!--<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12 input-group">-->
                    <!--<input type="text" class="form-control" placeholder="按名称查找" ng-model="findname">-->
                    <!--<span class="input-group-btn">-->
                        <!--<button class="btn btn-default" type="button" ng-click="find()">查找</button>-->
                    <!--</span>-->
                <!--</div>-->
            </div>
            <div class="table-responsive">
                <table id="example1" class="table table-striped b-t b-light table-bordered">
                    <thead>
                        <tr>
                            <th style="text-align: center;">流程名称</th>
                            <th style="text-align: center;">操作</th>

                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in listData track by $index">
                            <td style="width: 15%">{{item}}</td>

                            <td style="width: 20%">

                                <button class="btn btn-sm btn-default" ng-click="$state.go('app.Approval_ManageItems', { 'typeName': item })">
                                    <i class="fa fa-file-text-o text"></i>
                                    <span class="text">查看详情</span>
                                </button>
                            </td>

                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<script>
    angular.module('app')//非标优惠
.controller("Approval_ManageC", function ($scope, $state, $http) {

    $http({
        url: "/api/Approval/Manage",
        method: "GET"
    })
     .then(function (res) {
         $scope.listData = res.data;
     })
     .then(function (error) {
         if (error) {
             alert("数据获取失败");
         }
     });

    })

</script>

